-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EPMGCIP-179: Configure linters #31
base: main
Are you sure you want to change the base?
Conversation
…operties, update max warnings to 30
lint-staged.config.mjs
Outdated
@@ -1,5 +1,5 @@ | |||
const config = { | |||
'*.{js,jsx,ts,tsx}': ['eslint --fix --max-warnings 100', 'prettier --write'], | |||
'*.{js,jsx,ts,tsx}': ['eslint --fix --max-warnings 30', 'prettier --write'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Dzmitry-Yaniuk
What do you think about decreasing warnings to '0'? It was '0' before switching to nextjs, so I guess we can try to continue doing that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea! From my opinion absence of warnings in code is a project good shape indicator.
However, with existing applied rules we get already around 10 warnings, refactoring code in terms of this PR might not be a good idea. Perhaps I can set this limit now to 20 items?
Otherwise code cannot be pushed without bypass option for git commit.
.eslintrc.json
Outdated
"next/core-web-vitals", | ||
"eslint:recommended", | ||
"prettier", | ||
"plugin:@typescript-eslint/recommended" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously we also used this plugins:
'plugin:jest/recommended',
'plugin:react-hooks/recommended',
'airbnb',
'airbnb/hooks',
'airbnb-typescript'
Maybe there is a sense to add them as well. What do you think about that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since there are existing eslint:recommended
and prettier
plugins I assume airbnb
related plugins might be a little redundant (quite rules in common). What do you think?
…ate usage in test to resolve warning
https://jira.epam.com/jira/browse/EPMGCIP-179
Code changes
.gitignore
to exclude MS and JetBrains IDE working settings;.eslint.json
file with multiple rules ESLint rules for TypeScript, JavaScript and React;.prettierignore
file with folders to exclude some directories from checking for Prettier;messages
folder intsconfig.json
;Notes